package com.gxjc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.gxjc.dao.bean.PickDao;
import com.gxjc.model.Pick;
@Transactional
public class PickService {
	@Autowired
	PickDao pickDao;
	public List<Pick> getAll(){
		return pickDao.getAll();	
	}
	
	public void save(Pick pick) {
		pickDao.save(pick);
	}
	
	public void delete(int id) {
		pickDao.delete(id);
	}
	
	public Pick getPickById(int id) {
		return (Pick)pickDao.getPickById(id);
	}
	public List<Pick> getPickBySql(String sql) {
		return pickDao.getPickBySql(sql);
	}
	public void update(Pick pick) {
		pickDao.update(pick);
	}
	//get and set

	public PickDao getPickDao() {
		return pickDao;
	}

	public void setPickDao(PickDao pickDao) {
		this.pickDao = pickDao;
	}
	
	
}
